import re
import requests
from pprint import pprint

#url = 'https://kyfw.12306.cn/otn/resources/js/framework/station_name.js?station_version=1.8971'
url = 'https://kyfw.12306.cn/otn/resources/js/framework/station_name.js?station_version=1.9028'
head = {
    'Host':'kyfw.12306.cn',
    'User-Agent':'Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.81 Safari/537.36'
}
response = requests.get(url, verify=False)
stationsTemp = re.findall(u'([\u4e00-\u9fa5]+)\|([A-Z]+)', response.text)
#pprint(dict(stationsTemp), indent=4)

stations = dict(stationsTemp)
'''
for key in stations.keys():
    a.append(key.encode('utf-8').decode('utf-8'))
for value in stations.values():
    b.append(value.encode('utf-8').decode('utf-8'))
print a
print b
'''
a = []
b = []

print stations.keys()
print stations.values()